package com.by.service.impl;

import com.by.bean.User;
import com.by.mapper.UserMapper;
import com.by.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserServiceImpl implements UserService {

    @Autowired
    UserMapper userMapper;
    @Override
    public User query(String name) {
        return userMapper.query(name);
    }

    @Override
    public int insert(User user) {
        return userMapper.insert(user);
    }

    @Override
    public List<User> queryAll() {

        return userMapper.queryAll();
    }
}
